package com.yj.cmp.sdk.fusioncompute.compute.cluster.vo;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author huangp
 * @create 2021-08-31 15:59
 */

@NoArgsConstructor
@Data
public class ClusterDetailVO {

    @SerializedName("drsSetting")
    private DrsSettingDTO drsSetting;
    @SerializedName("haResSetting")
    private HaResSettingDTO haResSetting;
    @SerializedName("haSetting")
    private HaSettingDTO haSetting;
    @SerializedName("isEnableDrs")
    private Boolean isEnableDrs;
    @SerializedName("isEnableHa")
    private Boolean isEnableHa;
    @SerializedName("isMemOvercommit")
    private Boolean isMemOvercommit;
    @SerializedName("name")
    private String name;
    @SerializedName("statistics")
    private String statistics;
    @SerializedName("uri")
    private String uri;
    @SerializedName("urn")
    private String urn;

    @NoArgsConstructor
    @Data
    public static class DrsSettingDTO {
        @SerializedName("drsLevel")
        private Integer drsLevel;

        @NoArgsConstructor
        @Data
        public static class DrsRulesDTO {
        }
    }

    @NoArgsConstructor
    @Data
    public static class HaResSettingDTO {
    }

    @NoArgsConstructor
    @Data
    public static class HaSettingDTO {
        @SerializedName("accessControlSetting")
        private AccessControlSettingDTO accessControlSetting;
        @SerializedName("haExtensionConfig")
        private List<?> haExtensionConfig;
        @SerializedName("hostRelatedFaultResponse")
        private HostRelatedFaultResponseDTO hostRelatedFaultResponse;
        @SerializedName("isAccessControl")
        private Boolean isAccessControl;
        @SerializedName("isMassFaultControl")
        private Boolean isMassFaultControl;
        @SerializedName("ishostRelatedFaultResponse")
        private Boolean ishostRelatedFaultResponse;
        @SerializedName("massFaultControl")
        private MassFaultControlDTO massFaultControl;
        @SerializedName("vmRelatedFaultResponse")
        private VmRelatedFaultResponseDTO vmRelatedFaultResponse;

        @NoArgsConstructor
        @Data
        public static class AccessControlSettingDTO {
            @SerializedName("controlPolicy")
            private Integer controlPolicy;
            @SerializedName("cpuReservation")
            private Integer cpuReservation;
            @SerializedName("failoverHosts")
            private List<?> failoverHosts;
            @SerializedName("hbDataStoreNumber")
            private Integer hbDataStoreNumber;
            @SerializedName("hbDataStorePolicy")
            private Integer hbDataStorePolicy;
            @SerializedName("hbDataStorePreferred")
            private List<?> hbDataStorePreferred;
            @SerializedName("hostsFaultQuantity")
            private Integer hostsFaultQuantity;
            @SerializedName("isAutoMigrateAllVms")
            private Boolean isAutoMigrateAllVms;
            @SerializedName("isCustomisedSlot")
            private Boolean isCustomisedSlot;
            @SerializedName("isHaHostAutonomy")
            private Boolean isHaHostAutonomy;
            @SerializedName("isolateArbitrateAddress")
            private String isolateArbitrateAddress;
            @SerializedName("memoryReservation")
            private Integer memoryReservation;
            @SerializedName("slotcpuinmhz")
            private Integer slotcpuinmhz;
            @SerializedName("slotmeminmb")
            private Integer slotmeminmb;
        }

        @NoArgsConstructor
        @Data
        public static class HostRelatedFaultResponseDTO {
            @SerializedName("hostDatastoreFaultResponse")
            private Integer hostDatastoreFaultResponse;
            @SerializedName("hostFaultResponse")
            private Integer hostFaultResponse;
            @SerializedName("vimsIOHangTimeout")
            private Integer vimsIOHangTimeout;
        }

        @NoArgsConstructor
        @Data
        public static class MassFaultControlDTO {
            @SerializedName("massHostFaultControlTime")
            private Integer massHostFaultControlTime;
            @SerializedName("maxProcessNumOnMassHostFault")
            private Integer maxProcessNumOnMassHostFault;
        }

        @NoArgsConstructor
        @Data
        public static class VmRelatedFaultResponseDTO {
            @SerializedName("vmFaultProcess")
            private Integer vmFaultProcess;
        }
    }
}
